﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _010_011_012操作符详解_8_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            unsafe
            {
                 Student stu = new Student();
                stu.ID=1;
                stu.Score = 100;
                Student* pStu = &stu;
                pStu->ID = 2;
                Console.WriteLine(stu.ID);
                // .操作符比*优先级高
                Console.WriteLine((*pStu).Score);
            }

        }

        //指针只能操作结构体类型 不能操作引用类型
        struct Student
        {
            public int ID;
            public long Score;
        }
    }
}
